import React, { Component, Fragment } from 'react';
import { HashRouter as Router, Route, Switch } from 'react-router-dom';
//import { PrivateRoute } from './routes/private';  拦截是否需要进行登录处理
import asyncComponent from './components/async/AsyncComponent';
//import indexComponent from './pages/home/index/index';  没有异步加载路由
const indexComponent = asyncComponent(() => import("./pages/home/index/index"));
class RouterComponent extends Component {
  render() {
    return (
      <Fragment>
        <Router>
          <Fragment>
            <Switch>
              <Route exact path="/" component={indexComponent}></Route>
            </Switch>
          </Fragment>
        </Router>
      </Fragment>
    );
  }
}
export default RouterComponent;
